package com.test;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.union.dao.PCDAO;
import com.union.entitybean.Category;
import com.union.entitybean.PC;
import com.union.entitybean.Person;
import com.union.entitybean.Personinfo;
import com.union.session.PersonBean;

public class test {

	/**
	 * @date Mar 7, 2008
	 * @author Hans
	 * @param args
	 */
	@SuppressWarnings("unchecked")
	public static void main(String[] args) {
//		System.out.print("Strat==============>");
//		String [] strs = {"../../applicationContext-resources.xml","../../applicationContext.xml"};
		String [] strs = {"../../applicationContext.xml"};
		ApplicationContext ctx = new ClassPathXmlApplicationContext(strs, test.class);
//
		PersonBean personBean = new PersonBean();
		Person person = new Person();
		person.setPersonId(22);
		Personinfo personinfo = new Personinfo();
		Collection<Category> selectedList = new ArrayList<Category>();
		personBean.update(person, personinfo, selectedList);
		
//		PersonBean personBean = new PersonBean();
//		CategoryBean categoryBean = new CategoryBean();
//		
//		Category category = new Category();
//		category.setCateId(3);
//		
//		int personId = 22;
//		
//		List list = categoryBean.findByPersonId(personId);
//		System.out.print(list.size());
//
//		Person person = new Person();
//		person.setTitle("Mr");
//		person.setPname("11");
//		try {
//			personService.createPerson(person);
//		} catch (Exception e) {
//			System.out.println(e.getMessage());
//		}
//
//		List<Person> list = personService.findAll();
//		System.out.println(list.size());
	}

}
